﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MemberInfo_IntegralOptions : Frame.Pages.ActionInfomationEditBasePage
{
    protected override string ActionID
    {
        get { return "6002"; }
    }

    protected override string UserFunctions
    {
        get
        {
            if (CMSUser.Current.IsLogin)
            {
                if (CMSUser.Current.IsAdmin)
                {
                    return "IUDQ";
                }
                else
                {
                    return CMSUser.GetFunction(ActionID) != null ? CMSUser.GetFunction(ActionID).op : "";
                }
            }
            else
            {
                return "";
            }
        }
    }

    protected override bool IsShowSpecialFunctions
    {
        get
        {
            if (CMSUser.Current.IsLogin)
            {
                if (CMSUser.Current.IsAdmin)
                {
                    return true;
                }
                else
                {
                    return CMSUser.GetFunction(ActionID).op_s == "Y" ? true : false;
                }
            }
            else
            {
                return false;
            }
        }
    }

    protected override void Page_Load(object sender, EventArgs e)
    {
        gridView.SettingsText.PopupEditFormCaption = "编辑";
        base.Page_Load(sender, e);
    }
    protected void LSMDSource_Inserting(object sender, DevExpress.Data.Linq.LinqServerModeDataSourceEditEventArgs e)
    {
        e.Values["founder"] = CMSUser.Current.ID;
        e.Values["fdate"] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
        e.Values["editor"] = CMSUser.Current.ID;
        e.Values["edate"] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
    }
    protected void LSMDSource_Updating(object sender, DevExpress.Data.Linq.LinqServerModeDataSourceEditEventArgs e)
    {
        e.Values["editor"] = CMSUser.Current.ID;
        e.Values["edate"] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
    }
}